package com.apes.enquiry.supplier.santouliubi.repository;

import com.apes.enquiry.supplier.santouliubi.model.ShopManagement;
import com.apes.framework.jpa.repository.CustomRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * 类描述：
 *
 * @ClassName ShopManagementRepository
 * @Description 描述
 * @Author wushilong
 * @Date 2022/12/13 19:14
 * @Version 1.0
 */
public interface ShopManagementRepository extends CustomRepository<ShopManagement, String> {

    @Query(value = "select a from ShopManagement a where a.storeId = :storeId and a.storeId is not null")
    ShopManagement findByStoreIdAndSantouIdNotNull(@Param("storeId") String storeId);

    @Query(value = "select a from ShopManagement a where a.storeName like %:name%")
    List<ShopManagement> findByStoreName(String name);
}
